#include<stdio.h>
int main()
{
    int sum,n;
    scanf("%d",&n);
    for(int a = 0;a <= n / 3;a++){
        for(int b = 0;b <= n / 2 - a;b++){
            int c = n - a- b;
            if(c >= 0&&c % 2 == 0) {
                if((a * 3 + b * 2 + c / 2) == n){
                    sum++;
                }
            }
        }
    }
    printf("%d",sum);
}
